(function () {
	//获取商铺信息
	var $modal = $('#pop-modal');
	var iShopId = parseInt(page.url.get('id'));	 
	var oMenu = {};
	getShopInfo ();
	function getShopInfo ()
	{

		//导航
		getJson(Domain+'/comm/widget/doSearchShopWidgetData.do', {
			widgetName:'shop_pc_top_navigation',
			widgetDataType:2,
			shopId:iShopId
		}, function (res) {
		  
		  if(!res.success){
	
		    $('.am-modal-bd').text(res.errorMessage);
				$modal.modal();
				setTimeout(function () {
					$modal.modal('close');
				},iWiating);

		  }
		  else{

				oMenu = res.data.widgetData;
		  }
		});


		//商店基本信息
		getJson(Domain+'/shop/doLoadShopInfo.do', {
			id:iShopId
		}, function (res) {
		  
		  if(!res.success){
	
		    $('.am-modal-bd').text(res.errorMessage);
				$modal.modal();
				setTimeout(function () {
					$modal.modal('close');
				},iWiating);

		  }
		  else{

		  	res.data.widgetData = oMenu;
	  	 	renderTmp('#shopdetails', 'shopdetailstpl',res);
	  	 	
		  }
		});
	};

})();